home *** CD-ROM | disk | FTP | other *** search
- /* display.h -- defines for niftyterm display routines
- *
- * (C) Copyright 1988, Chris Newman
- * All Rights Reserved
- * Permission is granted ot copy, modify, and use this as long
- * as this notice remains intact. This is a nifty program.
- *
- * $Author: CN/TW $ $Revision: 1.2 $ $Date: 1991/04/23 00:00:00 $
- */
-
- /* globals:
- * int emulation; the current emulation mode
- * int vt100_yucky_wrap_mode; emulator sets this to 0 when non-graphic character input
- * is received.
- * int ansi_LNM; ansi line feed/new line mode. if set, CR=CR,LF
- */
-
- /* emulation types -- stored in global int emulation */
- #define EMU_VT102 0 /* similar to ANSI -- may be software switched to VT52 */
- #define EMU_VT52 1 /* may be switched by software to VT102 */
- #define EMU_H19 2 /* codes from h19 program */
-
- /* types for dsstyle */
- #define BOLD1 1
- #define BOLD0 2
- #define ITALIC1 3
- #define ITALIC0 4
- #define UNDERLINE1 5
- #define UNDERLINE0 6
- #define INVERSE1 7
- #define INVERSE0 8
- #define HALFBRITE1 9
- #define HALFBRITE0 10
- #define BLINK1 11
- #define BLINK0 12
- #define BLANK1 13
- #define BLANK0 14
- #define ALTERNATE1 15
- #define ALTERNATE0 16
- #define DWIDTH1 17
- #define DWIDTHTOP 18
- #define DWIDTHBOT 19
- #define DWIDTH0 20
- #define STYLESOFF 255
- /* these are used internally to display.c */
- #define SAVE_STYLE 256
- #define RESTORE_STYLE 257
-
- /* types for dscursormove */
- #define CURSOR_UP 1
- #define CURSOR_DOWN 2
- #define CURSOR_LEFT 3
- #define CURSOR_RIGHT 4
- #define BEGIN_LINE 5
- #define END_LINE 6
- #define NEXT_LINE 7
- #define BOTTOM_HOME 8
- #define SAVE_CURSOR 9
- #define RESTORE_CURSOR 10
- #define INDEX 11
- #define DOWN1_AND_SCROLL 12
- #define REVERSE_INDEX 13
- #define INSERT_LINE 14
- #define DELETE_LINE 15
- #define INSERT_CHAR 16
- #define TAB_STOP 17
-
- /* types for dsfunction */
- #define ERASETO_EOL 1
- #define ERASETO_EOS 2
- #define ERASETO_SOL 3
- #define ERASETO_SOS 4
- #define ERASE_LINE 5
- #define RESET_DISPLAY 6
- #define SCROLL_UP 7
- #define SCROLL_DOWN 8
- #define ORIGIN_ON 9
- #define ORIGIN_OFF 10
- #define BLOCK_CURSOR 11
- #define UNDERLINE_CURSOR 12
- #define INVISIBLE_CURSOR 13
- #define VISIBLE_CURSOR 14
- #define WRAP_ON 15
- #define WRAP_OFF 16
- #define INSERT_ON 17
- #define INSERT_OFF 18
- #define SET_TAB 19
- #define CLEAR_TAB 20
- #define CLEAR_ALL_TABS 21
-
- /* types for dsinvert */
- #define INVERT_ON 1
- #define INVERT_OFF 2
- #define VISUAL_BELL 3
-
- /* commands for dskeyboard */
- #define DS_AUTOREPEAT 1 /* on if val is true */
- #define DS_LEDS 2 /* val is bit pattern */
- #define DS_KEYCLICK 3 /* on if val is true */
- #define DS_CURSORMODE 4 /* modes for the cursor keys */
- #define DS_KEYPADMODE 5 /* modes for the numeric keypad */
- #define DS_KEYPADAPPMODE 6 /* on if val is true */
-
- /* arguments for dskeyboard cursor modes */
- #define CURSOR_VT100 0 /* vt100 cursor key mode */
- #define CURSOR_ANSI 1 /* ansi cursor key mode */
- #define CURSOR_VT52 2 /* vt52 cursor key mode */
-
- /* arguments for dskeyboard keypad modes */
- #define KEYPAD_ANSI 0 /* ansi numeric */
- #define KEYPAD_VT52 2 /* vt52 numeric */
- #define KEYPAD_H19 4 /* h19 numeric */
- #define KEYPAD_H19S 6 /* h19 shifted numeric */
- #define KEYPAD_H19ANSI 8 /* h19 ansi numeric */
- #define KEYPAD_H19SANSI 10 /* h19 shifted ansi numeric */
-
- /* niftyterm interface to a display & input manager:
- *******************************************
- * Display Generic Routines:
- *******************************************
- * dscursormove(int mv); -- see list of moves above
- * dsfunction(int what); -- see list of functions above
- * dsgetcursor(int *x, *y); -- get the current cursor position
- * dscursorto(int x, y); -- set the current cursor position
- * dsprintf(char *fmat, ...); -- print formatted output
- * dssetscroll(top,bottom); -- set the scrolling region
- * dsgetsize(int *maxx, *maxy); -- get the size of the window
- * int dscheckdown(); -- returns 0 if cursor on bottom line, otherwise
- * -- moves cursor down a line and returns new line number.
- *
- *******************************************
- * Display Specific Routines:
- *******************************************
- * dsinit(); -- initialize display options
- * dsstart(char *progname); -- starts the display, progname for title bars
- * dsquit(); -- clean up window & IO files
- * dsshowusage(); -- show additional switches for display
- * int dsparsearg(c, cont, next); -- parse a command line switch:
- * -- c = option, cont = rest of option, next = next arg
- * -- return: 0: invalid, 1: continue, 2: next used
- * int dsfillbuf(buf, len, mask); -- fills buf with up to len bytes from file descriptors in mask
- * int dsinputmask(); -- returns a file pointer mask for input to be sent to tty
- * int dsstyle(s); -- change the style (see #defines above)
- * -- return: 0 if ok, -1 if unavailable
- * int dscheckredraw(redraw); -- checks for a redraw, does flash, and sets delay timer
- * -- <0: Window close, =0: nothing, >0: redraw
- * dstestscreen(); -- fill display with E's for testing purposes.
- * dsdelete(n); -- delete n characters from under the cursor
- * dsputs(char *string); -- put a string of characters to the display.
- * dsclearscreen(); -- high speed clear of entire screen
- * dsclear(int x, y, x1, y1); -- clear a rectangular region
- * dsscroll(int y, numlines, amount); -- scroll a region
- * dsinvert(); -- see types above
- * dscursoron(); -- cursor on, and flush output
- * dscursoroff(); -- cursor off
- * dskeyboard(cmd, val); -- keyboard functions
- * dsothermask(); -- returns a file pointer mask for input to be sent to display
- * dsotherfillbuf(buf, len, mask); -- like dsfillbuf, but for input that goes directly to display
- *
- *******************************************
- * Internal Display Specific Routines:
- *******************************************
- * idssetfont(short attribs,int line); -- set the appropriate font for given attribs & line
- */
-